export default {
  formateDate(time) {
    if (!time) {
      return ''
    }
    let date = new Date(time)
    return `${date.getFullYear()}-${fixDateNum(date.getMonth()) +
      1}-${fixDateNum(date.getDate())} ${fixDateNum(date.getHours())}:${fixDateNum(date.getMinutes())}:${fixDateNum(date.getSeconds())}`
  }
}
function fixDateNum(num) {
  return num < 10 ? '0' + num : num
}
